3.375 \(\int \frac{\log (c (d+e x^n)^p)}{x (f+g x^n)^2} \, dx\)

Optimal. Leaf size=204 \[ -\frac{p \text{PolyLog}\left (2,-\frac{g \left (d+e x^n\right )}{e f-d g}\right )}{f^2 n}+\frac{p \text{PolyLog}\left (2,\frac{e x^n}{d}+1\right )}{f^2 n}-\frac{\log \left (c \left (d+e x^n\right )^p\right ) \log \left (\frac{e \left (f+g x^n\right )}{e f-d g}\right )}{f^2 n}+\frac{\log \left (-\frac{e x^n}{d}\right ) \log \left (c \left (d+e x^n\right )^p\right )}{f^2 n}+\frac{\log \left (c \left (d+e x^n\right )^p\right )}{f n \left (f+g x^n\right )}-\frac{e p \log \left (d+e x^n\right )}{f n (e f-d g)}+\frac{e p \log \left (f+g x^n\right )}{f n (e f-d g)} \]

[Out]

-((e*p*Log[d + e*x^n])/(f*(e*f - d*g)*n)) + Log[c*(d + e*x^n)^p]/(f*n*(f + g*x^n)) + (Log[-((e*x^n)/d)]*Log[c*
(d + e*x^n)^p])/(f^2*n) + (e*p*Log[f + g*x^n])/(f*(e*f - d*g)*n) - (Log[c*(d + e*x^n)^p]*Log[(e*(f + g*x^n))/(
e*f - d*g)])/(f^2*n) - (p*PolyLog[2, -((g*(d + e*x^n))/(e*f - d*g))])/(f^2*n) + (p*PolyLog[2, 1 + (e*x^n)/d])/
(f^2*n)

________________________________________________________________________________________

Rubi [A]  time = 0.268145, antiderivative size = 204, normalized size of antiderivative = 1., number of steps used = 12, number of rules used = 10, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.4, Rules used = {2475, 44, 2416, 2394, 2315, 2395, 36, 31, 2393, 2391} \[ -\frac{p \text{PolyLog}\left (2,-\frac{g \left (d+e x^n\right )}{e f-d g}\right )}{f^2 n}+\frac{p \text{PolyLog}\left (2,\frac{e x^n}{d}+1\right )}{f^2 n}-\frac{\log \left (c \left (d+e x^n\right )^p\right ) \log \left (\frac{e \left (f+g x^n\right )}{e f-d g}\right )}{f^2 n}+\frac{\log \left (-\frac{e x^n}{d}\right ) \log \left (c \left (d+e x^n\right )^p\right )}{f^2 n}+\frac{\log \left (c \left (d+e x^n\right )^p\right )}{f n \left (f+g x^n\right )}-\frac{e p \log \left (d+e x^n\right )}{f n (e f-d g)}+\frac{e p \log \left (f+g x^n\right )}{f n (e f-d g)} \]

Antiderivative was successfully verified.

[In]

Int[Log[c*(d + e*x^n)^p]/(x*(f + g*x^n)^2),x]

[Out]

-((e*p*Log[d + e*x^n])/(f*(e*f - d*g)*n)) + Log[c*(d + e*x^n)^p]/(f*n*(f + g*x^n)) + (Log[-((e*x^n)/d)]*Log[c*
(d + e*x^n)^p])/(f^2*n) + (e*p*Log[f + g*x^n])/(f*(e*f - d*g)*n) - (Log[c*(d + e*x^n)^p]*Log[(e*(f + g*x^n))/(
e*f - d*g)])/(f^2*n) - (p*PolyLog[2, -((g*(d + e*x^n))/(e*f - d*g))])/(f^2*n) + (p*PolyLog[2, 1 + (e*x^n)/d])/
(f^2*n)

Rule 2475

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.)*((f_) + (g_.)*(x_)^(s_))^(r_.),
 x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(f + g*x^(s/n))^r*(a + b*Log[c*(d + e*x)^p])^q,
x], x, x^n], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, q, r, s}, x] && IntegerQ[r] && IntegerQ[s/n] && Intege
rQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0])

Rule 44

Int[((a_) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*
x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rule 2416

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((h_.)*(x_))^(m_.)*((f_) + (g_.)*(x_)^(r_.))^(q
_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*Log[c*(d + e*x)^n])^p, (h*x)^m*(f + g*x^r)^q, x], x] /; FreeQ[{a,
 b, c, d, e, f, g, h, m, n, p, q, r}, x] && IntegerQ[m] && IntegerQ[q]

Rule 2394

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[(Log[(e*(f +
g*x))/(e*f - d*g)]*(a + b*Log[c*(d + e*x)^n]))/g, x] - Dist[(b*e*n)/g, Int[Log[(e*(f + g*x))/(e*f - d*g)]/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0]

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rule 2395

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[((f + g
*x)^(q + 1)*(a + b*Log[c*(d + e*x)^n]))/(g*(q + 1)), x] - Dist[(b*e*n)/(g*(q + 1)), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 2393

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Dist[1/g, Subst[Int[(a +
 b*Log[1 + (c*e*x)/g])/x, x], x, f + g*x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && EqQ[g
 + c*(e*f - d*g), 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin{align*} \int \frac{\log \left (c \left (d+e x^n\right )^p\right )}{x \left (f+g x^n\right )^2} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\log \left (c (d+e x)^p\right )}{x (f+g x)^2} \, dx,x,x^n\right )}{n}\\ &=\frac{\operatorname{Subst}\left (\int \left (\frac{\log \left (c (d+e x)^p\right )}{f^2 x}-\frac{g \log \left (c (d+e x)^p\right )}{f (f+g x)^2}-\frac{g \log \left (c (d+e x)^p\right )}{f^2 (f+g x)}\right ) \, dx,x,x^n\right )}{n}\\ &=\frac{\operatorname{Subst}\left (\int \frac{\log \left (c (d+e x)^p\right )}{x} \, dx,x,x^n\right )}{f^2 n}-\frac{g \operatorname{Subst}\left (\int \frac{\log \left (c (d+e x)^p\right )}{f+g x} \, dx,x,x^n\right )}{f^2 n}-\frac{g \operatorname{Subst}\left (\int \frac{\log \left (c (d+e x)^p\right )}{(f+g x)^2} \, dx,x,x^n\right )}{f n}\\ &=\frac{\log \left (c \left (d+e x^n\right )^p\right )}{f n \left (f+g x^n\right )}+\frac{\log \left (-\frac{e x^n}{d}\right ) \log \left (c \left (d+e x^n\right )^p\right )}{f^2 n}-\frac{\log \left (c \left (d+e x^n\right )^p\right ) \log \left (\frac{e \left (f+g x^n\right )}{e f-d g}\right )}{f^2 n}-\frac{(e p) \operatorname{Subst}\left (\int \frac{\log \left (-\frac{e x}{d}\right )}{d+e x} \, dx,x,x^n\right )}{f^2 n}+\frac{(e p) \operatorname{Subst}\left (\int \frac{\log \left (\frac{e (f+g x)}{e f-d g}\right )}{d+e x} \, dx,x,x^n\right )}{f^2 n}-\frac{(e p) \operatorname{Subst}\left (\int \frac{1}{(d+e x) (f+g x)} \, dx,x,x^n\right )}{f n}\\ &=\frac{\log \left (c \left (d+e x^n\right )^p\right )}{f n \left (f+g x^n\right )}+\frac{\log \left (-\frac{e x^n}{d}\right ) \log \left (c \left (d+e x^n\right )^p\right )}{f^2 n}-\frac{\log \left (c \left (d+e x^n\right )^p\right ) \log \left (\frac{e \left (f+g x^n\right )}{e f-d g}\right )}{f^2 n}+\frac{p \text{Li}_2\left (1+\frac{e x^n}{d}\right )}{f^2 n}+\frac{p \operatorname{Subst}\left (\int \frac{\log \left (1+\frac{g x}{e f-d g}\right )}{x} \, dx,x,d+e x^n\right )}{f^2 n}-\frac{\left (e^2 p\right ) \operatorname{Subst}\left (\int \frac{1}{d+e x} \, dx,x,x^n\right )}{f (e f-d g) n}+\frac{(e g p) \operatorname{Subst}\left (\int \frac{1}{f+g x} \, dx,x,x^n\right )}{f (e f-d g) n}\\ &=-\frac{e p \log \left (d+e x^n\right )}{f (e f-d g) n}+\frac{\log \left (c \left (d+e x^n\right )^p\right )}{f n \left (f+g x^n\right )}+\frac{\log \left (-\frac{e x^n}{d}\right ) \log \left (c \left (d+e x^n\right )^p\right )}{f^2 n}+\frac{e p \log \left (f+g x^n\right )}{f (e f-d g) n}-\frac{\log \left (c \left (d+e x^n\right )^p\right ) \log \left (\frac{e \left (f+g x^n\right )}{e f-d g}\right )}{f^2 n}-\frac{p \text{Li}_2\left (-\frac{g \left (d+e x^n\right )}{e f-d g}\right )}{f^2 n}+\frac{p \text{Li}_2\left (1+\frac{e x^n}{d}\right )}{f^2 n}\\ \end{align*}

Mathematica [A]  time = 0.183618, size = 171, normalized size = 0.84 \[ \frac{-p \text{PolyLog}\left (2,\frac{g \left (d+e x^n\right )}{d g-e f}\right )+p \text{PolyLog}\left (2,\frac{e x^n}{d}+1\right )+\frac{f \log \left (c \left (d+e x^n\right )^p\right )}{f+g x^n}-\log \left (c \left (d+e x^n\right )^p\right ) \log \left (\frac{e \left (f+g x^n\right )}{e f-d g}\right )+\log \left (-\frac{e x^n}{d}\right ) \log \left (c \left (d+e x^n\right )^p\right )-\frac{e f p \log \left (d+e x^n\right )}{e f-d g}+\frac{e f p \log \left (f+g x^n\right )}{e f-d g}}{f^2 n} \]

Antiderivative was successfully verified.

[In]

Integrate[Log[c*(d + e*x^n)^p]/(x*(f + g*x^n)^2),x]

[Out]

(-((e*f*p*Log[d + e*x^n])/(e*f - d*g)) + (f*Log[c*(d + e*x^n)^p])/(f + g*x^n) + Log[-((e*x^n)/d)]*Log[c*(d + e
*x^n)^p] + (e*f*p*Log[f + g*x^n])/(e*f - d*g) - Log[c*(d + e*x^n)^p]*Log[(e*(f + g*x^n))/(e*f - d*g)] - p*Poly
Log[2, (g*(d + e*x^n))/(-(e*f) + d*g)] + p*PolyLog[2, 1 + (e*x^n)/d])/(f^2*n)

________________________________________________________________________________________

Maple [C]  time = 1.217, size = 805, normalized size = 4. \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln(c*(d+e*x^n)^p)/x/(f+g*x^n)^2,x)

[Out]

-1/n*ln((d+e*x^n)^p)/f^2*ln(f+g*x^n)+1/n*ln((d+e*x^n)^p)/f/(f+g*x^n)+1/n*ln((d+e*x^n)^p)/f^2*ln(x^n)+1/n*p*e/f
/(d*g-e*f)*ln(d+e*x^n)-1/n*p*e/f/(d*g-e*f)*ln(f+g*x^n)-1/n*p/f^2*dilog((d+e*x^n)/d)-1/n*p/f^2*ln(x^n)*ln((d+e*
x^n)/d)+1/n*p/f^2*dilog((e*(f+g*x^n)+d*g-f*e)/(d*g-e*f))+1/n*p/f^2*ln(f+g*x^n)*ln((e*(f+g*x^n)+d*g-f*e)/(d*g-e
*f))-1/2*I/n*Pi*csgn(I*c*(d+e*x^n)^p)^2*csgn(I*c)/f^2*ln(f+g*x^n)+1/2*I/n*Pi*csgn(I*c*(d+e*x^n)^p)^2*csgn(I*c)
/f/(f+g*x^n)-1/2*I/n*Pi*csgn(I*c*(d+e*x^n)^p)^3/f/(f+g*x^n)-1/2*I/n*Pi*csgn(I*(d+e*x^n)^p)*csgn(I*c*(d+e*x^n)^
p)^2/f^2*ln(f+g*x^n)+1/2*I/n*Pi*csgn(I*(d+e*x^n)^p)*csgn(I*c*(d+e*x^n)^p)^2/f/(f+g*x^n)+1/2*I/n*Pi*csgn(I*c*(d
+e*x^n)^p)^3/f^2*ln(f+g*x^n)-1/2*I/n*Pi*csgn(I*c*(d+e*x^n)^p)^3/f^2*ln(x^n)-1/2*I/n*Pi*csgn(I*(d+e*x^n)^p)*csg
n(I*c*(d+e*x^n)^p)*csgn(I*c)/f/(f+g*x^n)+1/2*I/n*Pi*csgn(I*(d+e*x^n)^p)*csgn(I*c*(d+e*x^n)^p)^2/f^2*ln(x^n)-1/
2*I/n*Pi*csgn(I*(d+e*x^n)^p)*csgn(I*c*(d+e*x^n)^p)*csgn(I*c)/f^2*ln(x^n)+1/2*I/n*Pi*csgn(I*c*(d+e*x^n)^p)^2*cs
gn(I*c)/f^2*ln(x^n)+1/2*I/n*Pi*csgn(I*(d+e*x^n)^p)*csgn(I*c*(d+e*x^n)^p)*csgn(I*c)/f^2*ln(f+g*x^n)-1/n*ln(c)/f
^2*ln(f+g*x^n)+1/n*ln(c)/f/(f+g*x^n)+1/n*ln(c)/f^2*ln(x^n)

________________________________________________________________________________________

Maxima [A]  time = 1.43476, size = 315, normalized size = 1.54 \begin{align*} -e n p{\left (\frac{\log \left (\frac{e x^{n} + d}{e}\right )}{e f^{2} n^{2} - d f g n^{2}} - \frac{\log \left (\frac{g x^{n} + f}{g}\right )}{e f^{2} n^{2} - d f g n^{2}} + \frac{\log \left (x^{n}\right ) \log \left (\frac{e x^{n}}{d} + 1\right ) +{\rm Li}_2\left (-\frac{e x^{n}}{d}\right )}{e f^{2} n^{2}} - \frac{\log \left (g x^{n} + f\right ) \log \left (-\frac{e g x^{n} + e f}{e f - d g} + 1\right ) +{\rm Li}_2\left (\frac{e g x^{n} + e f}{e f - d g}\right )}{e f^{2} n^{2}}\right )} +{\left (\frac{1}{f g n x^{n} + f^{2} n} - \frac{\log \left (g x^{n} + f\right )}{f^{2} n} + \frac{\log \left (x^{n}\right )}{f^{2} n}\right )} \log \left ({\left (e x^{n} + d\right )}^{p} c\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(d+e*x^n)^p)/x/(f+g*x^n)^2,x, algorithm="maxima")

[Out]

-e*n*p*(log((e*x^n + d)/e)/(e*f^2*n^2 - d*f*g*n^2) - log((g*x^n + f)/g)/(e*f^2*n^2 - d*f*g*n^2) + (log(x^n)*lo
g(e*x^n/d + 1) + dilog(-e*x^n/d))/(e*f^2*n^2) - (log(g*x^n + f)*log(-(e*g*x^n + e*f)/(e*f - d*g) + 1) + dilog(
(e*g*x^n + e*f)/(e*f - d*g)))/(e*f^2*n^2)) + (1/(f*g*n*x^n + f^2*n) - log(g*x^n + f)/(f^2*n) + log(x^n)/(f^2*n
))*log((e*x^n + d)^p*c)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{\log \left ({\left (e x^{n} + d\right )}^{p} c\right )}{g^{2} x x^{2 \, n} + 2 \, f g x x^{n} + f^{2} x}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(d+e*x^n)^p)/x/(f+g*x^n)^2,x, algorithm="fricas")

[Out]

integral(log((e*x^n + d)^p*c)/(g^2*x*x^(2*n) + 2*f*g*x*x^n + f^2*x), x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln(c*(d+e*x**n)**p)/x/(f+g*x**n)**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\log \left ({\left (e x^{n} + d\right )}^{p} c\right )}{{\left (g x^{n} + f\right )}^{2} x}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(d+e*x^n)^p)/x/(f+g*x^n)^2,x, algorithm="giac")

[Out]

integrate(log((e*x^n + d)^p*c)/((g*x^n + f)^2*x), x)